<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Request</title>
</head>
<body>
<h3>Jsp内置对象-Request</h3>
<jsp:include page="/jspdemo/header.jsp" />

	<%
		out.print("request.getHeader(user-agent)<br>");
		out.print(request.getHeader("user-agent") + "<br>");
		out.print("<hr color=red><br>");
		out.print("System.getProperty(os.name,os.version,os.arch)<br>");
		out.print(System.getProperty("os.name")+ "<br>");
		out.print(System.getProperty("os.version")+ "<br>");
		out.print(System.getProperty("os.arch")+ "<br>");
		out.print("<hr color=red><br>");
		out.print("request.getServerName()"+"<br>");
		out.print(request.getServerName() + "<br>");
		out.print("request.getServerPort()"+"<br>");
		out.print(request.getServerPort() + "<br>");
		out.print("request.getServletPath()"+"<br>");
		out.print(request.getServletPath() + "<br>");
		out.print("<hr color=red><br>");
		out.print("request.getContextPath()"+"<br>");
		out.print(request.getContextPath() + "<br>");
		out.print("request.getMethod()"+"<br>");
		out.print(request.getMethod() + "<br>");
		out.print("<hr color=red><br>");
		out.print("当前Web应用的物理路径"+ "<br>");
		out.print("application.getRealPath(/)"+"<br>");
		out.print(application.getRealPath("/") + "<br>");
		out.print("request.getSession().getServletContext().getRealPath(/)"+"<br>");
		out.print(request.getSession().getServletContext().getRealPath("/") + "<br>");
		out.print("<hr color=red><br>");
		out.print("当前JSP文件的物理路径 "+"<br>");
		out.print("request.getSession().getServletContext().getRealPath(request.getRequestURI()) "+"<br>");
		out.print(request.getSession().getServletContext().getRealPath(request.getRequestURI()) +"<br>");
		out.print("application.getRealPath(request.getRequestURI())"+"<br>");
		out.print(application.getRealPath(request.getRequestURI()) + "<br>");
		out.print("<hr color=red><br>");
		out.print("URI and URL<br>");
		out.print("request.getRequestURI()"+"<br>");
		out.print(request.getRequestURI() + "<br>");
		out.print("request.getRequestURL()"+"<br>");
		out.print(request.getRequestURL() + "<br>");
	%>
</body>
</html>